<?php
// +----------------------------------------------------------------------
// | Author: 张坤
// +----------------------------------------------------------------------
namespace Admin\Controller; 
class WebsettingController extends AdminController { 
	public function index() {
		$_list=M('Websetting')->select();
		if(count($_list)>0)
		{
			$obj=$_list[0];
		}
		$this->assign("data",$obj);
		$this->display('index');
	} 
	public function save() { 
		$res = D('Websetting')->update();
		if(!$res){
			$this->error(D('Websetting')->getError());
		}else{
			$this->success('保存成功！', U('Websetting/index'));
		}
	}
}